package com.shj.em.biz.finance.service;

import com.shj.em.biz.finance.entity.Payment;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.plugins.Page;
import com.shj.em.biz.sys.entity.Cd;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 付款信息 服务类
 *
 * @author Shen Huang Jian
 * @since 2018-07-13
 */
public interface PaymentService extends IService<Payment> {

    List<Payment> getPaymentsByOrderId(Long orderId);

    /**
     * 分页查询
     * @return
     */
    Page<Payment> queryPaymentPage(Map<String, Object> params);

    BigDecimal getUnpaidAmount(Long orderId, Long paymentId);

    BigDecimal getTotalPaid(Long orderId);

    Cd createPayment(Payment payment);

    Cd updatePayment(Payment payment);

    Cd deletePaymentById(Long id);

    Cd deletePaymentByIds(Long[] ids);
}
